Optimal. Leaf size=137 \[ -\frac {a d \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right ) (d \sec (e+f x))^{-1+n} \sin (e+f x)}{f (1-n) \sqrt {\sin ^2(e+f x)}}+\frac {b \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(e+f x)\right ) (d \sec (e+f x))^n \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3872, 3857,
2722} \begin {gather*} \frac {b \sin (e+f x) (d \sec (e+f x))^n \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a d \sin (e+f x) (d \sec (e+f x))^{n-1} \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right )}{f (1-n) \sqrt {\sin ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 3857
Rule 3872
Rubi steps
\begin {align*} \int (d \sec (e+f x))^n (a+b \sec (e+f x)) \, dx &=a \int (d \sec (e+f x))^n \, dx+\frac {b \int (d \sec (e+f x))^{1+n} \, dx}{d}\\ &=\left (a \left (\frac {\cos (e+f x)}{d}\right )^n (d \sec (e+f x))^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-n} \, dx+\frac {\left (b \left (\frac {\cos (e+f x)}{d}\right )^n (d \sec (e+f x))^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-1-n} \, dx}{d}\\ &=-\frac {a \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\cos ^2(e+f x)\right ) (d \sec (e+f x))^n \sin (e+f x)}{f (1-n) \sqrt {\sin ^2(e+f x)}}+\frac {b \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(e+f x)\right ) (d \sec (e+f x))^n \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 107, normalized size = 0.78 \begin {gather*} \frac {\csc (e+f x) \left (a (1+n) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\sec ^2(e+f x)\right )+b n \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\sec ^2(e+f x)\right )\right ) (d \sec (e+f x))^n \sqrt {-\tan ^2(e+f x)}}{f n (1+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \left (d \sec \left (f x +e \right )\right )^{n} \left (a +b \sec \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \sec {\left (e + f x \right )}\right )^{n} \left (a + b \sec {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (a+\frac {b}{\cos \left (e+f\,x\right )}\right )\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________